-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui5-select): introduce value
property
#7865
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ilhan007
changed the title
[draft]feat(ui5-select): support of "value" property
[draft]feat(ui5-select): support of Nov 16, 2023
value
property
ilhan007
changed the title
[draft]feat(ui5-select): support of
feat(ui5-select): support of Nov 18, 2023
value
propertyvalue
property
FYI @dobrinyonkov |
ilhan007
requested review from
nnaydenow,
vladitasev,
pskelin and
dobrinyonkov
November 26, 2023 18:09
ilhan007
changed the title
feat(ui5-select): support of
feat(ui5-select): introduce Nov 27, 2023
value
propertyvalue
property
dobrinyonkov
approved these changes
Nov 28, 2023
ilhan007
added a commit
to SAP/ui5-webcomponents-ngx
that referenced
this pull request
Dec 5, 2023
- Select web component has new property "value" that should fix FormControl issues as the Select ngx wrapper relies on setting/getting value SAP/ui5-webcomponents#7865 - TextArea and StepInput now provide @formEvents, @formProperty so that respective ngx wrappers are extending the GenericControlValueAccessor and thus support FormControl properly SAP/ui5-webcomponents#7859
PetyaMarkovaBogdanova
pushed a commit
that referenced
this pull request
Dec 5, 2023
**Background** The topic how the form components work inside forms from the perspective of Angular and React wrappers was recently brought to us. Once more we discussed the native Select HTMLElement and the presence of "value" and that in general form components are supposed to support "value". We also agreed that it makes easier to get the resulting select's value without looping over the options and finding the selected one. Also it looks more consistent with the other form components. Property "value" was already requested in the past but rejected - we did not add "value" because we did not want to have a second API to define the selected option as it might lead to issues as they may contradict each other. **Decision** To add "value" only if the true state remains within the options and "value" becomes kind of a shorthand for reading/updating the options, and support "value" only as a property, not as an attribute. **Changes in the PR** Introduces public `value` property - working only as a property, not as an attribute - as getter - returns the "value" or the text content of the selected option - as a setter - sets the selected option if the given value matches an option.
ilhan007
added a commit
to SAP/ui5-webcomponents-ngx
that referenced
this pull request
Dec 6, 2023
* feat: update to ui5-webcomponents 1.20.0 - Select web component has new property "value" that should fix FormControl issues as the Select ngx wrapper relies on setting/getting value SAP/ui5-webcomponents#7865 - TextArea and StepInput now provide @formEvents, @formProperty so that respective ngx wrappers are extending the GenericControlValueAccessor and thus support FormControl properly SAP/ui5-webcomponents#7859 * fix: fixed generator and parser to use some of the types directly (#104) * fix: fixed component parsing and generation * fix: using only public methods * fix: updated snapshots * chore: updated snapshots --------- Co-authored-by: Giorgi Cheishvili <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
The topic how the form components work inside forms from the perspective of Angular and React wrappers was recently brought to us. Once more we discussed the native Select HTMLElement and the presence of "value" and that in general form components are supposed to support "value". We also agreed that it makes easier to get the resulting select's value without looping over the options and finding the selected one. Also it looks more consistent with the other form components.
Property "value" was already requested in the past but rejected - we did not add "value" because we did not want to have a second API to define the selected option as it might lead to issues as they may contradict each other.
Decision
To add "value" only if the true state remains within the options and "value" becomes kind of a shorthand for reading/updating the options, and support "value" only as a property, not as an attribute.
Changes in the PR
Introduces public
value
property - working only as a property, not as an attribute